function Format(){

};

Format.prototype.timestamp = function (){
    return moment().valueOf();
}

Format.prototype.dateYmd = function(num){
    let result = '';
    if(num){
        result = moment(num).format('YYYY-MM-DD');
    }else{
        result = moment().format('YYYY-MM-DD')
    }
    return result;
}


Format.prototype.dateYmdhms = function(num){
    let result = '';
    if(num){
        result = moment(num).format('YYYY-MM-DD HH:mm:ss');
    }else{
        result = moment().format('YYYY-MM-DD HH:mm:ss');
    }
    return result;
}

let format = new Format();

module.exports = format